From ea78378d2cb685b6fa3897a91435c36235b75446 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 1 Apr 2009 15:39:20 +0100 Subject: [PATCH] Only set scheduler quantum timer for non-idle VCPUs This removes the last idle periodic timer in xen, and enhances the idle average C state residency from two-digits ms to three-digit ms. Signed-off-by: Yu Ke Signed-off-by: Tian Kevin --- xen/common/schedule.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index f1121938da..23807ea330 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -818,8 +818,9 @@ static void schedule(void) next = next_slice.task; sd->curr = next; - - set_timer(&sd->s_timer, now + r_time); + + if ( !is_idle_vcpu(next) ) + set_timer(&sd->s_timer, now + r_time); if ( unlikely(prev == next) ) { -- 2.30.2